<template>
  <div>
    {{ index }}
    <button  @click="msgChange">修改tabbar信息数量</button>
  </div>
</template>

<script lang="ts" setup>
// @ts-ignore
import pubsub from "pubsub-js";
import useTabbarStore from "@/store/tabbar";
import {ref} from "vue"
const useTabber = useTabbarStore();
let index = ref(0);
const msgChange = () => {
  index.value++
  useTabber.setMsgNum(0, index.value);
};
pubsub.subscribe("navBarTapBack",()=>{
  console.log("navBarTapBack")
})
</script>

<style></style>
